//
//  TOMyActivityViewController.m
//  X-Tribe
//
//  Created by Miss.Ou on 16/4/6.
//  Copyright © 2016年 Miss.Ou. All rights reserved.
//

#import "TOMyActivityViewController.h"
#import "TOMyActivityCell.h"
#import "TOAddPicViewController.h"

@interface TOMyActivityViewController ()<UITableViewDelegate,UITableViewDataSource,TOMyActivityCellDelegate>
@property(nonatomic,strong)UITableView *tableView;

@end

@implementation TOMyActivityViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [self createTableView];
}
-(void)createTableView{
    
    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) style:UITableViewStylePlain];
    [self.view addSubview:self.tableView];
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    [self.tableView registerClass:[TOMyActivityCell class] forCellReuseIdentifier:@"TOMyActivityCell"];
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    

}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    return 10;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    TOMyActivityCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TOMyActivityCell"];
    
    cell.myActivityCellDelegate = self;
    
    return cell;
    
}
-(void)JumpToAddPic{
    
    TOAddPicViewController *addPicVC = [[TOAddPicViewController alloc] init];
    [self.navigationController pushViewController:addPicVC animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
